package com.jumper.study.admin.dto.resp;

import java.time.LocalDateTime;
import java.time.ZoneOffset;

public class LessonEbookResp {
    private Long id;

    private Long lessonId;

    private String title;

    private String lesson;

    private String file;

    private Boolean onself;

    private Integer sort;

    private LocalDateTime updatedAt;

    public LessonEbookResp(Long id, Long lessonId, String title, String lesson, String file, Boolean onself, Integer sort,
        LocalDateTime updatedAt) {
        this.id = id;
        this.lessonId = lessonId;
        this.title = title;
        this.lesson = lesson;
        this.file = file;
        this.onself = onself;
        this.sort = sort;
        this.updatedAt = updatedAt;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getLessonId() {
        return lessonId;
    }

    public void setLessonId(Long lessonId) {
        this.lessonId = lessonId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getLesson() {
        return lesson;
    }

    public void setLesson(String lesson) {
        this.lesson = lesson;
    }

    public String getFile() {
        return file;
    }

    public void setFile(String file) {
        this.file = file;
    }

    public Boolean getOnself() {
        return onself;
    }

    public void setOnself(Boolean onself) {
        this.onself = onself;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public Long getUpdatedAt() {
        return updatedAt.toEpochSecond(ZoneOffset.UTC);
    }

    public void setUpdatedAt(LocalDateTime updatedAt) {
        this.updatedAt = updatedAt;
    }
}
